import os

from django.apps import AppConfig
from django.core.cache import cache


class AppNameConfig(AppConfig):
    default_auto_field = "django.db.models.BigAutoField"
    name = "wxcloudrun"

    def ready(self):
        # put your startup code here
        cache.set("MCH_ID", os.environ.get("MCH_ID", "1636858174"), timeout=None)
        cache.set(
            "ENV_ID", os.environ.get("ENV_ID", "prod-9gbx4romf8b968e1"), timeout=None
        )
